/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UserInterface;

import java.awt.Component;
import java.io.File;
import javax.swing.JFileChooser;

/**
 *
 * @author subx
 */
public class SRCFileChooser {
    private File input;
    private int option;
    private JFileChooser chooser;


    public SRCFileChooser() {
        chooser = new JFileChooser();
    }

    public void showFileChooser(Component parent) {
        setOption(chooser.showOpenDialog(parent));
    }

    public void loadFile() {
        if(getOption() == JFileChooser.APPROVE_OPTION)
            setInput(chooser.getSelectedFile());
    }

    public File getInput() {
        return this.input;
    }

    public void setInput(File f) {
        this.input = f;
    }
    
    public int getOption() {
        return this.option;
    }
    public void setOption(int i) {
        this.option = i;
    }
}
